<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>AMBHAS: ambhas::stats Namespace Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">AMBHAS
   
   </div>
   
  </td>
  
  
  
   
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('namespaceambhas_1_1stats.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">ambhas::stats Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classambhas_1_1stats_1_1SpatOutlier.html">SpatOutlier</a></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceambhas_1_1stats.html#a8e91bdaed3f65151e9835222afe07106">bias_correction</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceambhas_1_1stats.html#afbdebc3c7affb6d8a317dc396294d21c">mk_test</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceambhas_1_1stats.html#acf680ac025b1a963c8b6fcefbc7b7527">independant</a></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">tuple&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceambhas_1_1stats.html#a622bc6280469add9586c78965d6e1325">oc</a> = np.random.randn(100)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceambhas_1_1stats.html#ab4e58965cf370e19e8ad36308377e7ea">mc</a> = 2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceambhas_1_1stats.html#a9db52336d307e0fe4a03458cc51918da">mp</a> = 2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">tuple&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceambhas_1_1stats.html#a1a73f1989c31d0307d1bc820f4d8f419">mp_adjusted</a> = <a class="el" href="namespaceambhas_1_1stats.html#a8e91bdaed3f65151e9835222afe07106">bias_correction</a>(<a class="el" href="namespaceambhas_1_1stats.html#a622bc6280469add9586c78965d6e1325">oc</a>, <a class="el" href="namespaceambhas_1_1stats.html#ab4e58965cf370e19e8ad36308377e7ea">mc</a>, <a class="el" href="namespaceambhas_1_1stats.html#a9db52336d307e0fe4a03458cc51918da">mp</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">tuple&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceambhas_1_1stats.html#a5d1c5af321d9d15e222de6b56494a60e">x</a> = np.random.randn(5,20)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">tuple&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceambhas_1_1stats.html#ad182b5e8936e83d57cdad9e08a8ad45a">foo</a> = <a class="el" href="classambhas_1_1stats_1_1SpatOutlier.html">SpatOutlier</a>(<a class="el" href="namespaceambhas_1_1stats.html#a5d1c5af321d9d15e222de6b56494a60e">x</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">tuple&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceambhas_1_1stats.html#a7ca3022b35ac9d8986d901f35b84b987">x1</a> = foo.fill_with_nan()</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a8e91bdaed3f65151e9835222afe07106"></a><!-- doxytag: member="ambhas::stats::bias_correction" ref="a8e91bdaed3f65151e9835222afe07106" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="namespaceambhas_1_1stats.html#a8e91bdaed3f65151e9835222afe07106">ambhas.stats.bias_correction</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>oc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>mc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>mp</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<div class="fragment"><pre class="fragment">
Input:
    oc: observed current
    mc: modeled current
    mp: modeled prediction     

Output:
    mp_adjusted: adjusted modeled prediction
    
    
</pre></div> 
<p>Definition at line <a class="el" href="stats_8py_source.html#l00017">17</a> of file <a class="el" href="stats_8py_source.html">stats.py</a>.</p>

</div>
</div>
<a class="anchor" id="acf680ac025b1a963c8b6fcefbc7b7527"></a><!-- doxytag: member="ambhas::stats::independant" ref="acf680ac025b1a963c8b6fcefbc7b7527" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="namespaceambhas_1_1stats.html#acf680ac025b1a963c8b6fcefbc7b7527">ambhas.stats.independant</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>alpha</em> = <code>0.05</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<div class="fragment"><pre class="fragment">
this program calculates check if the joint cdf == multiplication of marginal
distribution or not 
using the chi-squared test 
    
Input:
    x:   a vector of data
    y:   a vector of data
    alpha: significance level

Output:
    ind: True (if independant) False (if dependant)
    p: p value of the significance test
    
Examples
--------
  &gt;&gt;&gt; x = np.random.rand(100)
  &gt;&gt;&gt; y = np.random.rand(100)
  &gt;&gt;&gt; ind,p = independant(x,y,0.05)  
</pre></div> 
<p>Definition at line <a class="el" href="stats_8py_source.html#l00108">108</a> of file <a class="el" href="stats_8py_source.html">stats.py</a>.</p>

</div>
</div>
<a class="anchor" id="afbdebc3c7affb6d8a317dc396294d21c"></a><!-- doxytag: member="ambhas::stats::mk_test" ref="afbdebc3c7affb6d8a317dc396294d21c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def <a class="el" href="namespaceambhas_1_1stats.html#afbdebc3c7affb6d8a317dc396294d21c">ambhas.stats.mk_test</a> </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>alpha</em> = <code>0.05</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<div class="fragment"><pre class="fragment">
this perform the MK (Mann-Kendall) test to check if there is any trend present in 
data or not

Input:
    x:   a vector of data
    alpha: significance level

Output:
    trend: tells the trend (increasing, decreasing or no trend)
    h: True (if trend is present) or False (if trend is absence)
    p: p value of the sifnificance test
    z: normalized test statistics 
    
Examples
--------
  &gt;&gt;&gt; x = np.random.rand(100)
  &gt;&gt;&gt; trend,h,p,z = mk_test(x,0.05) 
</pre></div> 
<p>Definition at line <a class="el" href="stats_8py_source.html#l00047">47</a> of file <a class="el" href="stats_8py_source.html">stats.py</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="ad182b5e8936e83d57cdad9e08a8ad45a"></a><!-- doxytag: member="ambhas::stats::foo" ref="ad182b5e8936e83d57cdad9e08a8ad45a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">tuple <a class="el" href="namespaceambhas_1_1stats.html#ad182b5e8936e83d57cdad9e08a8ad45a">ambhas::stats::foo</a> = <a class="el" href="classambhas_1_1stats_1_1SpatOutlier.html">SpatOutlier</a>(<a class="el" href="namespaceambhas_1_1stats.html#a5d1c5af321d9d15e222de6b56494a60e">x</a>)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="stats_8py_source.html#l00221">221</a> of file <a class="el" href="stats_8py_source.html">stats.py</a>.</p>

</div>
</div>
<a class="anchor" id="ab4e58965cf370e19e8ad36308377e7ea"></a><!-- doxytag: member="ambhas::stats::mc" ref="ab4e58965cf370e19e8ad36308377e7ea" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="namespaceambhas_1_1stats.html#ab4e58965cf370e19e8ad36308377e7ea">ambhas::stats::mc</a> = 2</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="stats_8py_source.html#l00208">208</a> of file <a class="el" href="stats_8py_source.html">stats.py</a>.</p>

</div>
</div>
<a class="anchor" id="a9db52336d307e0fe4a03458cc51918da"></a><!-- doxytag: member="ambhas::stats::mp" ref="a9db52336d307e0fe4a03458cc51918da" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="namespaceambhas_1_1stats.html#a9db52336d307e0fe4a03458cc51918da">ambhas::stats::mp</a> = 2</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="stats_8py_source.html#l00209">209</a> of file <a class="el" href="stats_8py_source.html">stats.py</a>.</p>

</div>
</div>
<a class="anchor" id="a1a73f1989c31d0307d1bc820f4d8f419"></a><!-- doxytag: member="ambhas::stats::mp_adjusted" ref="a1a73f1989c31d0307d1bc820f4d8f419" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">tuple <a class="el" href="namespaceambhas_1_1stats.html#a1a73f1989c31d0307d1bc820f4d8f419">ambhas::stats::mp_adjusted</a> = <a class="el" href="namespaceambhas_1_1stats.html#a8e91bdaed3f65151e9835222afe07106">bias_correction</a>(<a class="el" href="namespaceambhas_1_1stats.html#a622bc6280469add9586c78965d6e1325">oc</a>, <a class="el" href="namespaceambhas_1_1stats.html#ab4e58965cf370e19e8ad36308377e7ea">mc</a>, <a class="el" href="namespaceambhas_1_1stats.html#a9db52336d307e0fe4a03458cc51918da">mp</a>)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="stats_8py_source.html#l00215">215</a> of file <a class="el" href="stats_8py_source.html">stats.py</a>.</p>

</div>
</div>
<a class="anchor" id="a622bc6280469add9586c78965d6e1325"></a><!-- doxytag: member="ambhas::stats::oc" ref="a622bc6280469add9586c78965d6e1325" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">tuple <a class="el" href="namespaceambhas_1_1stats.html#a622bc6280469add9586c78965d6e1325">ambhas::stats::oc</a> = np.random.randn(100)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="stats_8py_source.html#l00207">207</a> of file <a class="el" href="stats_8py_source.html">stats.py</a>.</p>

</div>
</div>
<a class="anchor" id="a5d1c5af321d9d15e222de6b56494a60e"></a><!-- doxytag: member="ambhas::stats::x" ref="a5d1c5af321d9d15e222de6b56494a60e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">tuple <a class="el" href="namespaceambhas_1_1stats.html#a5d1c5af321d9d15e222de6b56494a60e">ambhas::stats::x</a> = np.random.randn(5,20)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="stats_8py_source.html#l00219">219</a> of file <a class="el" href="stats_8py_source.html">stats.py</a>.</p>

</div>
</div>
<a class="anchor" id="a7ca3022b35ac9d8986d901f35b84b987"></a><!-- doxytag: member="ambhas::stats::x1" ref="a7ca3022b35ac9d8986d901f35b84b987" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">tuple <a class="el" href="namespaceambhas_1_1stats.html#a7ca3022b35ac9d8986d901f35b84b987">ambhas::stats::x1</a> = foo.fill_with_nan()</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="stats_8py_source.html#l00222">222</a> of file <a class="el" href="stats_8py_source.html">stats.py</a>.</p>

</div>
</div>
</div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceambhas.html">ambhas</a>      </li>
      <li class="navelem"><a class="el" href="namespaceambhas_1_1stats.html">stats</a>      </li>

    <li class="footer">Generated on Sat Jul 21 2012 12:26:09 for AMBHAS by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
